package Year21_Month11.day1107;


class Animal{
    public void move(){
        System.out.println("动物可以移动");
    }
    public void bark(){
        System.out.println("动物可以叫");
    }
}

class Dog extends Animal{
    public void move(){
        System.out.println("狗可以蹦跶");
    }

    public void bark(){
        System.out.println("狗可以吼叫");
    }
}
public class TestDog {
    public static void main(String[] args) {
        Animal a = new Animal();
        Animal b = new Dog();
        a.move();
        b.move();
        b.bark();
    }
}
